﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using QualityRpt.Dao;

namespace QualityRpt.Service
{
    public class DeviceSupplierService:BaseService
    {
        private static IDeviceSupplierDao _impDao = null;
        static DeviceSupplierService()
        {
            _impDao = CreateDaoInstance("IDeviceSupplierDao") as IDeviceSupplierDao;
        }
        public static DataTable GetSchema()
        {
            DataTable rtTable = _impDao.GetList("ID=0");
            return rtTable.Clone();
        }
        public static DataRow Save(DataRow row)
        {
            return _impDao.Save(row);
        }
        public static DataRow Update(DataRow row)
        {
            return _impDao.Update(row);
        }
        public static DataRow Get(long id)
        {
            return _impDao.Get(id);
        }
        public static void Delete(long id)
        {
            _impDao.Delete(id);
        }
        public static DataTable GetList(string where)
        {
            return _impDao.GetList(where);
        }
        public static DataTable GetList(string where, string sort)
        {
            return _impDao.GetList(where, sort);
        }
        public static DataTable GetListSupplierName(string where, string sort, int Suppliername)
        {
            return _impDao.GetListSupplierName(where, sort, Suppliername);
        }
        public static DataRow GetByName(string name)
        {
            return _impDao.GetByName(name);
        }
    }
}
